const mongoose = require("mongoose");
const {Schema, model} = mongoose

const orderSchema = new Schema({
    price:Number,
    user:{type:Schema.Types.ObjectId,ref:'USER'},
    goods:{type:[{type:Schema.Types.ObjectId,ref:'GOODS'}]},
    start:{type: Number,enum:[-1,0,1,2,3],default:0},  //-1退款  0未支付  1支付完成 2发货  3签收
    number:Number,
})

module.exports = model('ORDER',orderSchema,'hez_order')
